package com.ftg.learn.day16.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 布衣
 */
public class TestAop {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.register(LearnAop.class, AopProxy.class, AopProxy1.class);
        context.refresh();

        //目标类吗 ？  spring给你的不是目标类，代理类
        LearnAop learnAop = context.getBean(LearnAop.class);

        int add = learnAop.add(1, 2);
        System.out.println(add);

    }

}
